<!--
 * Copyright ©
 * #  
 * @author: zw
 * @date: 2021-11-10 
 -->

<template>
  <div class="flex flex-col justify-center items-center h-vh:80" v-if="errorCode">
    <img class="w-13" :src="require(`@/assets/img/error.png`)" alt="error">
    <p class="mt-4 text-sm text-gray-400">{{errorData[errorCode]}}</p>
  </div>
</template>

<script lang="ts">
import { defineComponent, computed } from "vue";
import errorData from '@/datas/error'
import { useStore } from 'vuex';
export default defineComponent({
  name: "~ErrorTip",
  props: { errorData },
  setup(props, { emit, slots }) {

    const store = useStore();
    return { 
      errorCode: computed(() => store.state.errorCode),
      errorData };
  },
});
</script>

<style lang="css" scoped></style>
